package org.budo.xml.lexer.impl;

import java.util.List;

import org.budo.xml.lexer.XmlLexer;
import org.budo.xml.lexer.XmlParser;
import org.budo.xml.lexer.pojo.XmlDocument;
import org.budo.xml.lexer.pojo.XmlToken;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * @author lmw
 */
@Getter
@Setter
@NoArgsConstructor
public class BudoXmlParser implements XmlParser {
    private XmlLexer xmlLexer;

    public BudoXmlParser(XmlLexer xmlLexer) {
        this.xmlLexer = xmlLexer;
    }

    @Override
    public XmlDocument parse(String source) {
        List<XmlToken> tokens = this.xmlLexer.tokens(source);
        for (int i = 0; i < tokens.size(); i++) {
            XmlToken token = tokens.get(i);
            System.err.println(token);
        }

        return null;
    }
}